# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=sloth-fuzzer
pkgver=40.0f0cf2e
pkgrel=1
groups=('blackarch' 'blackarch-fuzzer')
pkgdesc='A smart file fuzzer.'
arch=('x86_64' 'aarch64')
url='https://github.com/mfontanini/sloth-fuzzer'
license=('custom:unknown')
depends=('crypto++' 'flex' 'bison')
makedepends=('git')
source=("git+https://github.com/mfontanini/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  ./configure --prefix=/usr

  make
}

package() {
  cd $pkgname

  install -Dm 755 sloth "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

